package com.nhim.cms.admin.client.rpc;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;
import com.nhim.cms.admin.shared.TemplateRPCProxy;
import com.nhim.cms.admin.shared.TemplateResourceProxy;

public interface TemplateRPCServiceAsync {
	
	void persitTemplate(TemplateRPCProxy template,AsyncCallback<String> callback) throws IllegalArgumentException;
	void findAllGroupTemplate(AsyncCallback<List<TemplateRPCProxy>> callback) throws IllegalArgumentException;
	void findAllSiteTemplate(AsyncCallback<List<TemplateRPCProxy>> callback) throws IllegalArgumentException;
	void findAllContentTemplateTemplate(Integer contentId,AsyncCallback<List<TemplateRPCProxy>> callback) throws IllegalArgumentException;
	void remove(Integer Id, AsyncCallback<Boolean> callback) throws IllegalArgumentException;
	void findAllResources (Integer Id, AsyncCallback<List<TemplateResourceProxy>> callback) throws IllegalArgumentException;
	void removeResource(Integer Id,String fileName, AsyncCallback<Boolean> callback) throws IllegalArgumentException;
	void findEditableResoures(Integer templateId, AsyncCallback<List<TemplateResourceProxy>> callback) throws IllegalArgumentException;
	void retrieveContent(Integer templateId,String filename, AsyncCallback<String> callback) throws IllegalArgumentException;
	void saveFile(Integer templateId,String content,String fileName, AsyncCallback<Boolean> callback) throws IllegalArgumentException;
}

